package org.eenie.kdassistant.utils;

import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.net.Uri;

/**
 * Created by Eenie on 2017/8/9.
 * Email: eeniework@gmail.com
 * Des:
 */

public class ProviderUtil {

    public static void updateState(Context context, String express, int state, String state_des) {
        ContentResolver resolver = context.getContentResolver();
        Uri uri = Uri.parse("content://org.eenie.kdassistant.provider.ExpressStateProvider");
        ContentValues values = new ContentValues();
        values.put("state_des", state_des);
        values.put("state", state);
        resolver.update(uri, values, "express = ?", new String[]{express});
    }
}
